package com.yuedao.sender.model1;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "ydx_payment_tracking")
public class YdxPaymentTrackingEntity {
    private int id;
    private String orderNo;
    private String outTradeNo;
    private Integer status;
    private Timestamp paymentTime;
    private String description;
    private Integer userId;
    private String buyerId;
    private Integer totalFee;
    private String transactionId;
    private String gmtPayment;
    private String buyerLoginId;
    private String tradeType;
    private Integer orderId;
    private Integer realFee;

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "order_no")
    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    @Basic
    @Column(name = "out_trade_no")
    public String getOutTradeNo() {
        return outTradeNo;
    }

    public void setOutTradeNo(String outTradeNo) {
        this.outTradeNo = outTradeNo;
    }

    @Basic
    @Column(name = "status")
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Basic
    @Column(name = "payment_time")
    public Timestamp getPaymentTime() {
        return paymentTime;
    }

    public void setPaymentTime(Timestamp paymentTime) {
        this.paymentTime = paymentTime;
    }

    @Basic
    @Column(name = "description")
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Basic
    @Column(name = "user_id")
    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }


    @Basic
    @Column(name = "buyer_id")
    public String getBuyerId() {
        return buyerId;
    }

    public void setBuyerId(String buyerId) {
        this.buyerId = buyerId;
    }

    @Basic
    @Column(name = "total_fee")
    public Integer getTotalFee() {
        return totalFee;
    }

    public void setTotalFee(Integer totalFee) {
        this.totalFee = totalFee;
    }

    @Basic
    @Column(name = "transaction_id")
    public String getTransactionId() {
        return transactionId;
    }

    public void setTransactionId(String transactionId) {
        this.transactionId = transactionId;
    }

    @Basic
    @Column(name = "gmt_payment")
    public String getGmtPayment() {
        return gmtPayment;
    }

    public void setGmtPayment(String gmtPayment) {
        this.gmtPayment = gmtPayment;
    }

    @Basic
    @Column(name = "buyer_login_id")
    public String getBuyerLoginId() {
        return buyerLoginId;
    }

    public void setBuyerLoginId(String buyerLoginId) {
        this.buyerLoginId = buyerLoginId;
    }

    @Basic
    @Column(name = "trade_type")
    public String getTradeType() {
        return tradeType;
    }

    public void setTradeType(String tradeType) {
        this.tradeType = tradeType;
    }


    @Basic
    @Column(name = "order_id")
    public Integer getOrderId() {
        return orderId;
    }

    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }


    @Basic
    @Column(name = "real_fee")
    public Integer getRealFee() {
        return realFee;
    }

    public void setRealFee(Integer realFee) {
        this.realFee = realFee;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        YdxPaymentTrackingEntity that = (YdxPaymentTrackingEntity) o;
        return id == that.id &&
                Objects.equals(orderNo, that.orderNo) &&
                Objects.equals(outTradeNo, that.outTradeNo) &&
                Objects.equals(status, that.status) &&
                Objects.equals(paymentTime, that.paymentTime) &&
                Objects.equals(description, that.description) &&
                Objects.equals(userId, that.userId) &&
                Objects.equals(buyerId, that.buyerId) &&
                Objects.equals(totalFee, that.totalFee) &&
                Objects.equals(transactionId, that.transactionId) &&
                Objects.equals(gmtPayment, that.gmtPayment) &&
                Objects.equals(buyerLoginId, that.buyerLoginId) &&
                Objects.equals(tradeType, that.tradeType);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, orderNo, outTradeNo, status, paymentTime, description, userId, buyerId, totalFee, transactionId, gmtPayment, buyerLoginId, tradeType);
    }
}
